﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Yamfinder.Service;

namespace Yamfinder.Web.Controllers
{
    public class HomeController : Controller
    {
        private readonly IUserService _userService;

        public HomeController(IUserService userService)
        {
            _userService = userService;
        }

        public ActionResult Index()
        {
            //First run check
            if (_userService.IsFirstRun()) return RedirectToAction("FirstRun", "Account");
            
            ViewBag.Message = "Welcome to Yamfinder!!!!";

            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
